- /* sdfexpac.cpp by K.Tsuru */
- // function ID 3317 DRADIX
- /**************************************************************************
- SDouble class
- It provides a function which checks the argument x is proper or not, i.e.
- it returns whether the exponential function exp(x) occurs an overflow/underflow
- error or not by an integer value.
-
- From the condition "exp(x) < DRADIX^DRADIX_EXP_MAX" the range of 'x' must be
- within
- |x| < DFIGURES*log(10)*DRADIX_EXP_MAX = 301759.17...
- ***************************************************************************/
- #ifndef SN_H
- #include "sn.h"
- #endif
-
- static const double xMax = (double)DFIGURES * M_LN10 * (double)DRADIX_EXP_MAX;
- // = 301759.17...
-
- SNManager::SNErrorFlag ExpArgCheck(const SDouble& x, int funcID) {
- double iX = doubleD(x, 0);
- SNManager::SNErrorFlag err = x.SNError();
-
- if( fabs(iX) < xMax ) return x.NO_ERR;
- err = (x.Sign() > 0) ? x.OVERFLOW_ERR : x.UNDERFLOW_ERR;
-
- if (funcID > 0) {
- x.Puts(5, 20);
- x.SetError(err, " exp(x) \"x\" has above value.", funcID);
- }
- return err;
- }
sdfexpac.cpp : last modifiled at 2007/10/01 15:45:40(1,079 bytes)
created at 2017/10/07 10:22:50
The creation time of this html file is 2017/10/07 11:29:39 (Sat Oct 07 11:29:39 2017).